import java.util.Arrays;

public class Solution1304 {
    public int[] sumZero(int n) {
        int[] f=new int[n];
        int now=0;
        for (int i=1;i<=n/2;i++){
            f[now]=-i;
            now++;
        }
        if (n%2==1){
            now++;
        }
        for (int i=1;i<=n/2;i++){
            f[now]=i;
            now++;
        }
        return f;
    }

    public static void main(String[] args) {
        System.out.println(Arrays.toString(new Solution1304().sumZero(5)));
    }
}
